package com.example.shop.modules.sys.controller;


import com.example.shop.modules.sys.service.IFreightService;
import com.example.shop.persistence.entity.Freight;
import com.example.shop.utils.JSONResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import static com.example.shop.utils.JSONResult.renderSuccess;

/**
 * <p>
 * 运费表 前端控制器
 * </p>
 *
 * @author jason
 * @since 2020-12-02
 */
@Api(tags = "运费表")
@RestController
@RequestMapping("/sys/freight")
public class FreightController {

    @Autowired
    private IFreightService freightService;

    @GetMapping
    @ApiOperation(value = "查询")
    public JSONResult getFreight(){
        return renderSuccess(freightService.list());
    }
}

